package org.spider.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 租户表
 * </p>
 *
 * @author lzy
 * @since 2022-06-02 15:36:46
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("spider_auth_tenant")
@ApiModel(value = "SpiderAuthTenantEntity对象", description = "租户表")
public class SpiderAuthTenantEntity extends Model<SpiderAuthTenantEntity> {

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("租户名称")
    @TableField("tenant_name")
    private String tenantName;

    @ApiModelProperty("域名地址")
    @TableField("tenant_domain")
    private String tenantDomain;

    @ApiModelProperty("联系人")
    @TableField("tenant_linkman")
    private String tenantLinkman;

    @ApiModelProperty("联系电话")
    @TableField("tenant_contact_number")
    private String tenantContactNumber;

    @ApiModelProperty("联系地址")
    @TableField("tenant_address")
    private String tenantAddress;

    @ApiModelProperty("租户状态，1：被禁用；2：正常使用；3：被删除")
    @TableField("tenant_status")
    private Integer tenantStatus;

    @ApiModelProperty("备注")
    @TableField("tenant_remark")
    private String tenantRemark;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
